<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
    <style>
        form{
            display: table;
        }
        form .field{
            display: table-row;
        }
        form.cell{
            display: table-cell;
        }
    </style>
</head>
<body>
<form action="/doRegister" method="post" autocomplete="off">
    <div class="field">
        <label for="username">用户名</label>
        <input type="text" name="username" id="username" required>
    </div>
    <div class="field">
        <label for="password">密　码</label>
        <input type="password" name="password" id="password" required>
    </div>
    <div class="field">
       <label>性　别</label>
        <input type="radio" id="gender-male" name="gender" value="0"><label for="gender-male">男</label>
        <input type="radio" id="gender-female" name="gender" value="1"><label for="gender-female">女</label>
        <input type="radio" id="gender-unknown" name="gender" checked value="2"><label for="gender-unknown">保密</label>
    </div>
    <div class="field">
        <div class="cell">
            <label for="hometown">籍　贯</label>
        </div>
         <div class="cell">
            <select id="hometown" name="hometown"  required>
                <option value="">----请选择一项</option>
               #for(hometown: hometownList)
                    <option value="#{for.index}">#{hometown??""}</option>
                #end
            </select>
         </div>
    </div>
    <div class="field">
        <div class="cell">
            <label>爱  好</label>
        </div>
        <div class="cell">
            #for(hobby: hobbies)
             #if(hobby!=null)
                <input type="checkbox" name="hobby" id="hobby-#{for.index}" value="#{for.index}">
               <label for="hobby-#{for.index}">#{hobby}</label>
            #end
            #end
        </div>
    </div>
    <input type="submit" value="注册">
</form>
</body>

</html>